from time import sleep

from IXueShu import RedisClient

if __name__ == '__main__':
    r = RedisClient()
    while True:
        pre_url = r.pop_pre_url()
        if pre_url is not None:
            if not r.isContains(pre_url):
                r.insert(pre_url)
                r.push_url('https://www.ixueshu.com'+pre_url)
            else:
                print(pre_url)
        sleep(0.2)